package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.model.CartItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface CartItemMapper extends BaseMapper<CartItem> {
    @Select("select * from tb_cart where uid = #{uid}")//没有给product，所以前端没拿到，只有一个productID
    List<CartItem> getCartByUid(Integer uid);

    @Select("select * from tb_cart where id in (${ciid})")
    List<CartItem> getCartByIds(String ciid);
}
